#include <stdio.h>
#include <stdlib.h>
#include "double_list.h"


int main(int argc, char *argv[])
{
    _DList head = create_list();
    _DNode *node = NULL;

    int i = 0;
    int j = 0;

    for (i; i < 10; i++)
    {
	printf("please input a number:\n");
	scanf("%d", &j);
	node = create_node();
	init_node(node, (void *)j);
	insert_to_list(head, node);
    }

    print_list(head);

    printf("Please input the element you want to delete:\n");
    scanf("%d", &j);
    delete_node(head, (void *)j);

    print_list(head);

//    for_each_node(head, print_node);
    return 0;
}
